package com.huaxin.device.dto.request;

import com.huaxin.hxenum.validation.ValidDeviceType;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

@Data
public class AddDeviceInstanceReqDTO {

    /**
     * 唯一序列号
     */
    @NotBlank(message = "序列号不能为空")
    @Schema(description = "唯一序列号", requiredMode = Schema.RequiredMode.REQUIRED, example = "SN123456789")
    private String serialNumber;

    /**
     * 设备名称
     */
    @NotBlank(message = "设备名称不能为空")
    @Schema(description = "设备名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "厨房断路器1号")
    private String deviceName;

    /**
     * 型号ID
     */
    @NotBlank(message = "型号ID不能为空")
    @Schema(description = "型号ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "m123e456-789a-bcde-f012-3456789abcde")
    private String modelId;

    /**
     * 型号编码
     */
    @NotBlank(message = "型号编码不能为空")
    @Schema(description = "型号编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "CB-2023A")
    private String modelCode;

    /**
     * 设备类型
     */
    @NotBlank(message = "设备类型不能为空")
    @Schema(description = "设备类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "circuit_breaker")
    @ValidDeviceType
    private String deviceType;

    /**
     * 区域ID
     */
    @Schema(description = "区域ID", example = "z123e456-789a-bcde-f012-3456789abcde")
    private String zoneId;

    /**
     * 区域名称
     */
    @Schema(description = "区域名称", example = "厨房区域")
    private String zoneName;


    /**
     * 预计更换日期
     */
    @Schema(description = "预计更换日期", example = "2028-01-15")
    private String expectedReplacementDate;

    /**
     * 固件版本
     */
    @Schema(description = "固件版本", example = "v2.1.5")
    private String firmwareVersion;

    /**
     * 详细安装位置
     */
    @Schema(description = "详细安装位置", example = "厨房配电箱第3排第2列")
    private String installLocation;
}